package com.example.opengl;

import android.util.Log;

public final class KLog {

    private boolean LOG;
    private String TAG;

    private static final boolean OpenGLList = true;

    public KLog(String tag) {
        TAG = tag;

        if(tag.equals("OpenGLList")) {
            LOG = OpenGLList;
        } else {
            LOG = false;
            e("%s tag is not define",TAG);
        }
    }

    public void v(String format, Object... args) {
        if(LOG) Log.v(TAG, String.format(format, args));
    }

    public void d(String format, Object... args) {
        if(LOG) Log.d(TAG, String.format(format, args));
    }

    public void i(String format, Object... args) {
        if(LOG) Log.i(TAG, String.format(format, args));
    }

    public void w(String format, Object... args) {
        if(LOG) Log.v(TAG, String.format(format, args));
    }

    public void e(String format, Object... args) {
        Log.e(TAG, String.format(format, args));
    }
}